<%--
 *  File:    MasterdataRelationshipLog.jsp
 *  @Author: banshang
 *  Date:    2010/09/28
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.DoctorSummary"); 

  //init param
  String strModuleName = "DMS";
  String privilegeCode = "10350";
  String contextPath = request.getContextPath();

  String strTableName = "v_relationship";
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>MasterdataRelationshipLog</title>
<PageFlow:CheckPageFlow pageName="p_masterdatarelationshiplog"/>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/opal2/mootools.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/opal2/opal2.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/opal2/DBGrid.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %> 
<%
	Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
	HashMap userinfo = (HashMap)session.getAttribute("userinfo");
	if(totalsummary == null)
	{
		totalsummary = new Vector();
	}
%> 
<script>

</script>
</head>
<body>
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher"  target="_self">
<% //--------------------------------------  page location --%>
	<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" border="0" cellpadding="0">

	<input type="hidden" name="pagename" value="p_masterdatarelationshiplog">
	<input type="hidden" name="actionname">
	<custom:hidden property="globalpccode"/>
    <tr> 
	    <td> 
	      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
	         <tr class="deepblue-left" >
	          <td class="title_center" width="*"><%= label.getLabelName("L_Partner") %></td>
	          <td class="title_center" width="8%" ><%= label.getLabelName("L_Dept") %></td>
	          <td class="title_center" width="8%" ><%= label.getLabelName("L_ProductGroup") %></td>
	          <td class="title_center" width="8%"><%= label.getLabelName("L_BusinessAreaName") %></td>
	          <td class="title_center" width="8%"><%= label.getLabelName("L_Employee") %></td>
<%--	          <td class="title_center" width="10%"><%= label.getLabelName("L_Chanel") %></td>
	          <td class="title_center" width="10%"><%= label.getLabelName("L_ZSTFSalesChannel") %></td>
--%>	          <td class="title_center" width="6%"><%= label.getLabelName("L_YorN") + label.getLabelName("L_Target") %></td>
	          <td class="title_center" width="6%"><%= label.getLabelName("L_YesOrNoBale")  %></td>
	          <td class="title_center" width="6%"><%= label.getLabelName("L_IsProtocol") %></td>
	          <td class="title_center" width="6%"><%=label.getLabelName("L_Maker") %></td>
	          <td class="title_center" width="6%"><%=label.getLabelName("L_ChangedAction")+label.getLabelName("L_Action") %></td>
	          <td class="title_center" width="11%"><%=label.getLabelName("L_ChangedAction")+label.getLabelName("L_Time") %></td>
	        </tr>
	        <%
            	int i = 0;
             	String strClassType = new String();
          	%>
	         <logic:iterate id="onerow" collection="<%= totalsummary %>" indexId="idx">
	           	<%
	            	HashMap tempMap = (HashMap)pageContext.getAttribute("onerow");
	           		String executeType = (String)tempMap.get("executetype"); 
	            	if(i%2 == 1)
	            	{
	              		strClassType = "td-listrom";
	            	}else{
	              		strClassType = "";
	            	}
	            	i++;
	            	
	          	%>
	          	<tr id="tr<%=idx %>" onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'"  class="none">
	            	<td>
	            		<custom:write name="onerow" property="orgname" nbsp="true"/>
	            	</td>
	            	<td>
	            		<custom:write name="onerow" property="deptname" nbsp="true"/>
	            	</td>
	            	<td>
	            		<custom:write name="onerow" property="productgroupname" nbsp="true"/>
	            	</td>	            	
					<td>
			           	<custom:write name="onerow" property="areaname" nbsp="true"/>
					</td> 
					<td>
						<custom:write name="onerow" property="employeename" nbsp="true"/>
					</td> 
<%--					<td>
						<custom:write name="onerow" property="saleschannelname" nbsp="true"/>
					</td> 
					<td>
						<custom:write name="onerow" property="groupname" nbsp="true"/>
	            	</td>
--%>	            	
					<td>
						<custom:write name="onerow" dictType="YesOrNo" property="istarget" nbsp="true"/>
	     		    </td>
	     		   	<td>
						<custom:write name="onerow" dictType="YesOrNo" property="isbale" nbsp="true"/>
	     		    </td>
	     		    <td>
	     		    	<custom:write name="onerow" dictType="YesOrNo" property="hasprotocol" nbsp="true"/>
	     		    </td>
	     		    <td>
	     		    	<custom:write name="onerow" property="makername" nbsp="true"/>
	     		    </td>
					<td>
		     		    <%if("C".equals(executeType)){ %>
			     		    <%=label.getLabelName("L_Create") %>
		     		    <%}else if("M".equals(executeType)){ %>
		     		    	<%=label.getLabelName("L_Modify") %>
		     		    <%}else if("D".equals(executeType)){ %>
		     		    	<%=label.getLabelName("L_Delete") %>
		     		    <%}else{ %>
		     		    	&nbsp;
		     		    <%} %>
	     		    </td>	
	     		    <td>
	     		    	<custom:write name="onerow" property="executetime" dataFormat="yyyy-MM-dd HH:mm:ss" dataType="date" nbsp="true"/>
	     		    </td>
	     		 </tr>
	     	 </logic:iterate>
	      </table>
	    </td>
  </tr>
</table>
</form>
</body>
</html>